package com.shop.cereshop.app.service.buyer;

import com.github.pagehelper.PageInfo;
import com.shop.cereshop.app.page.buyer.blacklist.BuyerBlacklistVO;
import com.shop.cereshop.app.param.buyer.blacklist.AddBlacklistParam;
import com.shop.cereshop.app.param.buyer.blacklist.QueryBlacklistParam;
import com.shop.cereshop.commons.result.Result;

import java.util.List;
import java.util.Map;

public interface BuyerUserBlacklistService {

    /**
     * 查询用户的黑名单列表
     */
    Result<PageInfo<BuyerBlacklistVO>> getBlacklistPage(QueryBlacklistParam param);

    /**
     * 添加黑名单
     */
    Result<Object> addBlacklist(AddBlacklistParam param);

    /**
     * 移除黑名单
     */
    Result<Object> removeBlacklist(Long buyerUserId, Long blockedUserId);

    /**
     * 批量移除黑名单
     */
    Result<Object> batchRemoveBlacklist(Long buyerUserId, List<Long> blockedUserIds);

    /**
     * 检查是否在黑名单中
     */
    boolean isInBlacklist(Long buyerUserId, Long blockedUserId);

    /**
     * 查询被哪些用户拉黑了
     */
    List<Long> getBlockedByUserId(Long buyerUserId);

    /**
     * 自动解封过期的黑名单
     */
    void autoUnblockExpiredBlacklists();

    /**
     * 获取黑名单统计
     */
    Map<String, Object> getBlacklistStats(Long userId);

}
